package com.android.job.logic;

import android.os.Handler;

import com.android.job.fusion.FusionCode;
import com.android.job.service.Request;
import com.android.job.service.request.SearchJobRequest;

public class SearchJobLogic
{

	private static SearchJobLogic instance;

	private final static String URL = "http://192.168.10.221:8080/employment/protocol.do";

	private SearchJobLogic()
	{

	}

	public synchronized static SearchJobLogic getInstance()
	{
		if (instance == null)
		{
			instance = new SearchJobLogic();
		}
		return instance;
	}

	public Request searchJob(Handler handler, String salary, String region,
			String type, String degree, String publish, String begin)
	{
		SearchJobRequest searchJob = new SearchJobRequest(handler, FusionCode.URL);
		searchJob.setValues(salary, region, type, degree, publish, begin);
		searchJob.getJSONResponse();
		return searchJob;
	}

}
